﻿@namespace MudBlazor.Docs.Examples


<MudChart ChartType="ChartType.Line" ChartSeries="@Series" XAxisLabels="@XAxisLabels" Width="100%" Height="350px"></MudChart>

@code {
    public List<ChartSeries> Series = new List<ChartSeries>();
    public ChartOptions Options = new ChartOptions();
    public string[] XAxisLabels = { "1986-04-20", "1986-04-21", "1986-04-22", "1986-04-23", "1986-04-24", "1986-04-25", "1986-04-26" };
    protected override void OnInitialized()
    {
        double[] Data1 = { 65, 68, 70, 74, 74, 72, 74 };
        double[] Data2 = { 88, 90, 91, 92, 91, 90, 90 };
        double[] Data3 = { 89, 91, 92, 92, 92, 92, 91 };
        double[] Data4 = { 85, 86, 90, 90, 92, 99, 0 };


        Series.Add(new ChartSeries() { Name = "Chernobyl-1", Data = Data1 });
        Series.Add(new ChartSeries() { Name = "Chernobyl-2", Data = Data2 });
        Series.Add(new ChartSeries() { Name = "Chernobyl-3", Data = Data3 });
        Series.Add(new ChartSeries() { Name = "Chernobyl-4", Data = Data4 });

        Options.YAxisTicks = 400;

        StateHasChanged();
    }
}